home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991 …esperately Seeking Seven / Desperately Seeking Seven.2mg / Dev.CD.8 / Essentials / Tools / DTS.Samples / SC02BusyBox / BusyBox.asm / Busy.asm < prev    next >
Encoding:
Assembly Source File  |  1990-05-25  |  2.0 KB  |  72 lines  |  [04] ASCII Text (0x0000)

  1. ************************************************************************
  2. *
  3. * busybox.asm -- Version 3.0  (Main Program)
  4. *
  5. * Copyright (c)
  6. * Apple Computer, Inc.  1986-1990
  7. * All Rights Reserved.
  8. *
  9. * Developer Technical Support Apple II Sample Code
  10. *
  11. * This file contains the busybox program.
  12. *
  13. ************************************************************************
  14.  
  15.                case on
  16.  
  17.                copy 2/ainclude/e16.types
  18.                copy busybox.equ
  19.  
  20.                mcopy macros/busy.macros
  21.  
  22.                longi on
  23.                longa on
  24.  
  25. ************************************************************************
  26.  
  27. main           start
  28.  
  29.                phb                      ;Save caller's data bank pointer.
  30.                phd                      ;Save caller's direct page pointer.
  31.                phk                      ;Switch data bank into program bank.
  32.                plb
  33.  
  34.                _TLStartUp               ;Start up Tool Locator & Memory Mgr.
  35.                pha                      ;Find out who we are.
  36.                _MMStartUp
  37.                pla
  38.                sta userID
  39.  
  40.                jsr initGlobals          ;Initialize our globals.
  41.  
  42.                pha                      ;Start up the tools using
  43.                pha                      ;resources.
  44.                pushword userID
  45.                pea refIsResource
  46.                pushlong #1              ;Resource ID.
  47.                _StartupTools
  48.                PullLong initRef         ;Handle used by ShutdownTools.
  49.                bcs startFailed
  50.  
  51.                jsr setupMenus
  52.                jsr setupWindows
  53.                _InitCursor
  54.                jsr mainEvent
  55.  
  56. startFailed    pea refIsHandle          ;Now shut them all down.
  57.                pushlong initRef
  58.                _ShutdownTools
  59.  
  60.                pushword userID
  61.                _MMShutDown
  62.                _TLShutDown
  63.                _QuitGS quitParms        ;Leave here.
  64.  
  65. initRef        dc i4'0'
  66.  
  67. quitParms      dc i2'0'
  68.                dc i4'0'
  69.                dc i2'0'
  70.  
  71.                end
  72.